package com.wms.controller;

import com.wms.bean.ResultBean;
import com.wms.core.R;
import com.wms.dto.ArrivalDetailDto;
import com.wms.service.ArrivalDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "csy更新到货明细")
@RequestMapping("/api")
public class ArrivalDetailController {
    @Autowired
    ArrivalDetailService arrivalDetailService;

    @PutMapping("/arrivalDetail/batchUpdate")
    @ApiOperation("批量更新到货明细")
    public ResultBean batchUpdate(@RequestBody List<ArrivalDetailDto> arrivalDetailDtoList){
        int rs=arrivalDetailService.batchUpdate(arrivalDetailDtoList);
        return rs==1? R.success("更新成功"):R.fail("更新失败");
    }
}
